#encoding:utf8

import os
import time
import subprocess
from lib import *

if __name__ == '__main__':    
	applications={
					'hiservers': 'hiservers.py',
					'chrome.exe':'web.py',
					'talk.exe':'talk',
					'RTX.exe':'rtx.py',
					# 'moviescan_personal':'moviescan_personal.py',
					# 'outlook.exe':r'C:\Program Files\Microsoft Office\Office14\OUTLOOK.EXE',
					# 'DM2005.exe':'dm.py',
					# 'zhao_xiao_shuo.exe':'zhao_xiao_shuo.py'
					# 'strokeit.exe':'strokeit',
				}
	psnames	= [info.name.lower() for info in ps.listall()]

	for name in applications:
		if not name.lower() in psnames:
			cmd 	= applications[name]
			try:
				os.startfile(cmd)
				print('starting %s'%cmd)
			except Exception as ex:
				print(ex)


